package com.ynny.controller;

import com.ynny.config.OpenFeignConfig;
import com.ynny.config.ProduckFeignConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

//注解:
//① 标注在 @Controller 上是"接受"请求
//② 标注在 @FeignClient 上是"发送"请求
@FeignClient(name = "service-provider", configuration = OpenFeignConfig.class,fallback = ProduckFeignConfig.class)//日志,兜底服务
public interface HIService{
    @GetMapping("/provider/hello")
    String hello(@RequestParam(value = "username",required = false) String username);
}

